package com.xxxx.server.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xxxx.server.page.BasePage;
import com.xxxx.server.page.EmployeeExcel;
import com.xxxx.server.page.EmployeePage;
import com.xxxx.server.pojo.Employee;
import com.xxxx.server.pojo.EmployeeAdd;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.time.LocalDate;
import java.util.Date;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 */
@Component
public interface EmployeeMapper extends BaseMapper<Employee> {

    //导出所有数据
    List<Employee> findAllEmployee();

    /**
     * 获取所有员工(分页)
     * @param page
     * @param employee
     * @param beginDateScope
     * @return
     */
    IPage<Employee> getEmployeeByPage(Page<Employee> page, @Param("employee") Employee employee, @Param("beginDateScope") LocalDate[] beginDateScope);

    /**
     * 根据ID查询员工
     * @param id
     * @return
     */
    List<Employee> getEmployee(Integer id);

    /**
     * 获取所有员工账套
     * @param page
     * @return
     */
    IPage<Employee> getEmployeeWithSalary(Page<Employee> page);

   /* //时间差
    Long getTotal(@Param("emp") Employee employee,@Param("beginDateScope") Date[] beginDateScope);

    //更新员工信息
    Integer updateEmployeeById(Employee employee);

    //根据ID删除员工信息
    Integer deleteEmployeeById(Integer id);

    //添加一条员工信息
    Integer addEmployeeOne(EmployeeAdd employeeAdd);

    //获取员工对象根据id
    Employee getEmployeeById(Integer empId);


    //最大工号  完成添加时的自增
    Integer maxWorkID();
*/

    //导入数据 批量增加
    Integer addEmployees(@Param("list") List<Object> list);

}
